package com.example.analysis.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * course
 * @author
 */
@Data
public class Course implements Serializable {
    private String subId;

    private String teacherId;

    private String subName;

    private Double subCode;

    private String subAttribute;

    private String subTime;

    private String courseType;

    private Double  passRate;

    private static final long serialVersionUID = 1L;

    public String getSubId() {
        return subId;
    }

    public void setSubId(String subId) {
        this.subId = subId;
    }

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public String getSubName() {
        return subName;
    }

    public void setSubName(String subName) {
        this.subName = subName;
    }

    public Double getSubCode() {
        return subCode;
    }

    public void setSubCode(Double subCode) {
        this.subCode = subCode;
    }

    public String getSubAttribute() {
        return subAttribute;
    }

    public void setSubAttribute(String subAttribute) {
        this.subAttribute = subAttribute;
    }

    public String getSubTime() {
        return subTime;
    }

    public void setSubTime(String subTime) {
        this.subTime = subTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Course other = (Course) that;
        return (this.getSubId() == null ? other.getSubId() == null : this.getSubId().equals(other.getSubId()))
            && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
            && (this.getSubName() == null ? other.getSubName() == null : this.getSubName().equals(other.getSubName()))
            && (this.getSubCode() == null ? other.getSubCode() == null : this.getSubCode().equals(other.getSubCode()))
            && (this.getSubAttribute() == null ? other.getSubAttribute() == null : this.getSubAttribute().equals(other.getSubAttribute()))
            && (this.getSubTime() == null ? other.getSubTime() == null : this.getSubTime().equals(other.getSubTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSubId() == null) ? 0 : getSubId().hashCode());
        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
        result = prime * result + ((getSubName() == null) ? 0 : getSubName().hashCode());
        result = prime * result + ((getSubCode() == null) ? 0 : getSubCode().hashCode());
        result = prime * result + ((getSubAttribute() == null) ? 0 : getSubAttribute().hashCode());
        result = prime * result + ((getSubTime() == null) ? 0 : getSubTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", subId=").append(subId);
        sb.append(", teacherId=").append(teacherId);
        sb.append(", subName=").append(subName);
        sb.append(", subCode=").append(subCode);
        sb.append(", subAttribute=").append(subAttribute);
        sb.append(", subTime=").append(subTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
